//-----------------------------------------------------
// application.cpp
//-----------------------------------------------------

/**
 * comment here
 */

#include "application.h"

#include <assert.h>

namespace application {

	CApplication* CApplication::_instance = 0;

	CApplication::CApplication() : _initialized(false), _termination(false) 
	{
		assert(!_instance && "Only one instance of the application can be created");
		_instance = this;
	}

	bool CApplication::init() 
	{
		assert(!_initialized);
		_initialized = true;
		return true;
	}

	void CApplication::end()
	{
		_initialized = false;
	}

	void CApplication::run()
	{
		// Execute the main loop
		while (!terminationRequested())
			step();
	}

	void CApplication::step()
	{
	}

} // namespace application
